Skip to main content

Response Structure

When a job produces results, the API POSTs them to your configured results_endpoint in a paged envelope. Each page carries a results array of EReceipt objects.


Results Envelope​

FieldTypeDescription
jobIdstringThe job that produced these results
clientUserIdstring or nullYour internal user identifier, if one was supplied
clientEmailHashstring or nullHash of the user's email address, if one was supplied
pageNumbernumberThis page, counting from 1
totalPagesnumberTotal pages for the whole job
resultsarrayEReceipt objects for this page
{
"jobId": "98765",
"clientUserId": "user_42",
"clientEmailHash": "abc123...",
"pageNumber": 1,
"totalPages": 3,
"results": []
}

Paging​

Results are split across pages, and each page arrives as a separate POST to your endpoint. totalPages covers the whole job, so a job may deliver its pages from more than one worker and they may arrive out of order. Use pageNumber and totalPages to tell when you have received everything.

A job that finds nothing still delivers one page with an empty results array.

Failure Envelope​

If a job fails, you receive an error object in place of results.

FieldTypeDescription
jobIdstringThe job that failed
clientUserIdstring or nullYour internal user identifier, if one was supplied
clientEmailHashstring or nullHash of the user's email address, if one was supplied
error.codeintegerNumeric error code
error.messagestringHuman-readable error description
pageNumbernumberPresent only when the failure occurred partway through paging

Fields Controlled by Your Configuration​

Two configuration settings change what a receipt carries. See configuration.md.

SettingAffectsWhen falseWhen true
enable_pii_scrubbingereceiptEmailSubject, ereceiptRawHTMLtext, ereceiptRawHTMLereceiptRawHTML holds the raw HTML body; ereceiptRawHTMLtext is emptyPII is redacted from ereceiptEmailSubject and ereceiptRawHTMLtext. ereceiptRawHTML is empty, and the body is delivered as plain text in ereceiptRawHTMLtext
return_emlereceiptRawEML, ereceiptRawHTMLereceiptRawEML is null; the email body is delivered as HTMLereceiptRawEML holds the full raw EML, and the HTML body is not delivered

A receipt carries the email body in one form only. With return_eml off you get the HTML body, scrubbed to plain text if enable_pii_scrubbing is on. With return_eml on you get the raw EML instead, and the HTML fields are empty.


EReceipt Object​

Every field below is always present as a JSON key. A field that could not be extracted is null rather than absent.

Identity​

FieldTypeDescriptionExample
blinkReceiptIdstringUnique identifier assigned by BlinkReceipt"85n24efb-6ca3-532m-9170-9410d9e7e"
ereceiptEmailIdstring or nullMessage ID from the email provider"<msg-id@mail.gmail.com>"
appVersionstringVersion of the parsing application that processed this receipt"2.26.0"

Email Metadata​

FieldTypeDescriptionExample
emailTimestampstring or nullWhen the email was received, formatted yyyy-MM-dd HH:mm"2024-08-01 09:55"
emailTimestampISOstring or nullThe same timestamp as an ISO 8601 string"2024-08-01T09:55:00.000Z"
parseTimestampstring or nullWhen the receipt was parsed"2024-08-01 10:02"
ereceiptEmailProviderstring or nullEmail provider used by the end user"gmail"
ereceiptMerchantEmailstring or nullSender address of the retailer email, as detected during extraction"auto-confirm@amazon.com"
ereceiptEmailSubjectstring or nullSubject line of the email. Redacted when enable_pii_scrubbing is on"Your Amazon.com order"

Receipt Dates and Times​

These fields use confidence objects — see Confidence Object.

FieldTypeDescriptionExample
receiptDateconfidence objectPurchase date, formatted yyyy-MM-dd{ "value": "2024-08-01", "confidence": 100 }
receiptTimeconfidence objectPurchase time, formatted HH:mm{ "value": "09:55", "confidence": 100 }
deliveryDateconfidence objectDelivery date, formatted yyyy-MM-dd{ "value": "2024-08-04", "confidence": 100 }

Merchant Information​

FieldTypeDescriptionExample
bannerIdintegerInternal merchant identifier9136
merchantNameconfidence objectStore or brand name{ "value": "Amazon", "confidence": 100 }
clientMerchantNameconfidence objectClient-configured merchant name override{ "value": "Amazon US", "confidence": 100 }
ereceiptFulfilledBystring or nullFulfillment service name"Amazon"
ereceiptSubMerchantstring or nullSub-merchant name within a marketplace"TechSeller LLC"
ereceiptPOSSystemstring or nullPayment or point-of-sale platform that processed the order. Rarely populated"Squareup.com"

Store Location​

FieldTypeDescriptionExample
storeAddressstring or nullStreet address"410 Terry Ave N"
storeCitystring or nullCity"Seattle"
storeStatestring or nullState or region"WA"
storeZipstring or nullPostal code"98109"
storePhonestring or nullPhone number"206-266-1000"

Order Information​

FieldTypeDescriptionExample
ereceiptOrderNumberstring or nullOrder or confirmation number"113-1234567-8901234"
ereceiptOrderStatusstring or nullStatus of the order"completed"
ereceiptPurchaseTypestring or nullFulfillment method"Delivery"
cancellationbooleanWhether the email represents a cancellationfalse
preorderbooleanWhether the order is a preorderfalse

Financial Totals​

FieldTypeDescriptionExample
totalconfidence objectGrand total charged{ "value": 59.99, "confidence": 100 }
subtotalconfidence objectSubtotal before tax and shipping{ "value": 54.99, "confidence": 100 }
taxesconfidence objectTax amount{ "value": 4.40, "confidence": 100 }
feesconfidence objectAdditional fees{ "value": 1.50, "confidence": 100 }
tipconfidence objectTip amount{ "value": 3.00, "confidence": 100 }
ereceiptShippingCostsnumber, string or nullShipping and handling charges. Not a confidence object0.00
currencyCodestringISO 4217 currency code. Defaults to USD"USD"

Payment​

FieldTypeDescriptionExample
paymentChannelstring or nullHow the purchase was made"online"
transactionTypestring or nullType of transaction"purchase"
last4CCstring or nullLast four digits of the payment card"1234"
paymentMethodsarray or nullPayment methods used — see Payment Method—

Parsing and Verification​

FieldTypeDescriptionExample
parsingMethodstringHow the email was parsed: template or generic"template"
isEReceiptbooleanWhether the email was identified as a purchase receipttrue

Raw Content​

FieldTypeDescription
ereceiptRawHTMLstring or nullRaw HTML body of the email. Not populated when either enable_pii_scrubbing or return_eml is on
ereceiptRawHTMLtextstringPlain-text body with PII redacted. Populated only when enable_pii_scrubbing is on
ereceiptRawEMLstring or nullFull raw EML content. Populated only when return_eml is on

Products​

FieldTypeDescription
productsarray or nullLine items — see Products Array

Products Array​

Each EReceipt object contains a products array of EReceiptProduct objects.

FieldTypeDescriptionExample
productNamestring or nullFull display name of the product"Logitech MX Master 3 Wireless Mouse"
brandstring or nullProduct brand"Logitech"
categorystring or nullTaxonomy path for the product"Electronics > Computer Accessories"
sizestring or nullSize or variant descriptor"Large"
upcstring or nullUniversal Product Code"097855149138"
imgUrlstring or nullURL of the product thumbnail image"https://images.example.com/product.jpg"
productUrlstring or nullURL of the product page"https://amazon.com/dp/B07S395RWD"
productNumberconfidence objectRetailer's SKU or item number{ "value": "B07S395RWD", "confidence": 100 }
productDescriptionconfidence objectShort product description{ "value": "Wireless Mouse", "confidence": 100 }
quantityconfidence objectNumber of units purchased{ "value": 1, "confidence": 100 }
unitPriceconfidence objectPrice per unit{ "value": 54.99, "confidence": 100 }
totalPriceconfidence objectTotal price for this line item{ "value": 54.99, "confidence": 100 }
fullPriceconfidence objectUndiscounted price{ "value": 59.99, "confidence": 100 }
uomstring or nullUnit of measure"each"
purchaseStatusstring or nullPurchase status for this item"confirmed"
subProductsarray or nullComponents of a bundled item — see Sub-Products—
possibleProductsarray or nullCandidate matches when the product could not be identified confidently — see Possible Products—

Sub-Products​

subProducts holds the components of a bundled item, such as the individual pieces of a meal deal or a multi-pack.

Each entry has the same shape as an EReceiptProduct, but only three fields are ever populated. The rest are null.

FieldTypeDescriptionExample
productDescriptionconfidence objectDescription of the component{ "value": "Large Fries", "confidence": 100 }
quantityconfidence objectNumber of units. Defaults to 1{ "value": 1, "confidence": 100 }
totalPriceconfidence objectPrice for this component{ "value": 2.49, "confidence": 100 }

Sub-products do not nest further — a sub-product's own subProducts is always null.

"subProducts": [
{
"productDescription": { "value": "Large Fries", "confidence": 100 },
"quantity": { "value": 1, "confidence": 100 },
"totalPrice": { "value": 2.49, "confidence": 100 }
}
]

Possible Products​

When a product cannot be matched to our catalogue with confidence, possibleProducts holds the candidate matches, ranked by probability.

Each entry has the same shape as an EReceiptProduct, but only the fields below are populated. The rest are null, because a candidate match describes a catalogue product rather than a purchased line item — it carries no price, quantity or order detail.

FieldTypeDescriptionExample
productNamestring or nullName of the candidate product"Logitech MX Master 3"
brandstring or nullCandidate brand"Logitech"
categorystring or nullTaxonomy path for the candidate"Electronics > Computer Accessories"
sizestring or nullSize or variant descriptor"Large"
upcstring or nullUniversal Product Code"097855149138"
imgUrlstring or nullThumbnail image for the candidate"https://images.example.com/product.jpg"
probabilitynumber or nullMatch confidence from 0 to 10.92
"possibleProducts": [
{
"productName": "Logitech MX Master 3",
"brand": "Logitech",
"category": "Electronics > Computer Accessories",
"size": null,
"upc": "097855149138",
"imgUrl": "https://images.example.com/product.jpg",
"probability": 0.92
}
]

Payment Method​

Each object in the paymentMethods array describes one method used.

FieldTypeDescriptionExample
methodstring or nullPayment method"credit"
cardTypestring or nullCard type"visa"

Confidence Object​

Many fields are returned as confidence objects rather than plain values. This lets you assess the reliability of each extracted data point.

FieldTypeDescription
valuestring or numberThe extracted value
confidenceintegerConfidence score from 0 (lowest) to 100 (highest)

Example:

{
"value": 59.99,
"confidence": 100
}

Annotated Example​

{
"jobId": "98765",
"clientUserId": "user_42",
"clientEmailHash": "abc123...",
"pageNumber": 1,
"totalPages": 1,
"results": [
{
"blinkReceiptId": "85n24efb-6ca3-532m-9170-9410d9e7e",
"appVersion": "2.26.0",
"receiptDate": {
"value": "2024-08-01",
"confidence": 100
},
"receiptTime": null,
"emailTimestamp": "2024-08-01 09:55",
"emailTimestampISO": "2024-08-01T09:55:00.000Z",
"parseTimestamp": "2024-08-01 10:02",
"ereceiptEmailId": "<msg-id@mail.gmail.com>",
"ereceiptEmailProvider": "gmail",
"ereceiptMerchantEmail": "auto-confirm@amazon.com",
"ereceiptEmailSubject": "Your Amazon.com order has shipped",
"bannerId": 9136,
"merchantName": {
"value": "Amazon",
"confidence": 100
},
"ereceiptOrderNumber": "113-1234567-8901234",
"ereceiptOrderStatus": "completed",
"ereceiptPurchaseType": "Delivery",
"cancellation": false,
"preorder": false,
"currencyCode": "USD",
"subtotal": {
"value": 54.99,
"confidence": 100
},
"taxes": {
"value": 4.40,
"confidence": 100
},
"ereceiptShippingCosts": 0.00,
"total": {
"value": 59.39,
"confidence": 100
},
"parsingMethod": "template",
"isEReceipt": true,
"ereceiptRawHTML": "<html>...</html>",
"ereceiptRawHTMLtext": "",
"ereceiptRawEML": null,
"products": [
{
"productName": "Logitech MX Master 3 Wireless Mouse",
"brand": "Logitech",
"category": "Electronics > Computer Accessories",
"upc": "097855149138",
"imgUrl": "https://images.example.com/product.jpg",
"productNumber": {
"value": "B07S395RWD",
"confidence": 100
},
"productDescription": {
"value": "Wireless Mouse, Darkfield, Ergonomic",
"confidence": 100
},
"quantity": {
"value": 1,
"confidence": 100
},
"unitPrice": {
"value": 54.99,
"confidence": 100
},
"totalPrice": {
"value": 54.99,
"confidence": 100
},
"purchaseStatus": "shipped",
"subProducts": null,
"possibleProducts": [
{
"productName": "Example Wireless Mouse, Model A",
"brand": "Example Brand",
"category": "Electronics > Computer Accessories",
"size": null,
"upc": "000000000001",
"imgUrl": "https://images.example.com/candidate-a.jpg",
"probability": 0.62
},
{
"productName": "Example Wireless Mouse, Model B",
"brand": "Example Brand",
"category": "Electronics > Computer Accessories",
"size": null,
"upc": "000000000002",
"imgUrl": "https://images.example.com/candidate-b.jpg",
"probability": 0.31
}
]
}
],
"paymentMethods": [
{
"method": "credit",
"cardType": "visa"
}
],
"last4CC": "1234"
}
]
}

For more worked examples, see Sample Responses. For errors returned by an API request, see error-handling.md.